import common.download as c
import manage_db.query_db as dm

# 查询条件，空表示全查询
SERIES = 'Caribbeancom'
YEAR = ''
# 1 javbook
# 2 javbook_all
# 3 sukebei
MODE = 3
# sukebei关键词，提高搜索精度
KEYWORD = 'CARIB'
TRUST = 'Y'

if __name__ == '__main__':
    query_ans = dm.query_by_series_and_year(SERIES, YEAR)
    find_ans = dm.find_no_tor(query_ans)
    if MODE == 1:
        c.download_javbook(find_ans)
    if MODE == 2:
        c.download_javbook_all(find_ans)
    if MODE == 3:
        c.download_sukebei(find_ans, KEYWORD, TRUST)
